//
// Created by Administrator on 2020/1/7.
//

#ifndef WORLDMAGISK_SHARE_MEMORY_H
#define WORLDMAGISK_SHARE_MEMORY_H

#include <string>

class SharedMemory{
    static SharedMemory* Create(const std::string &name);

    int GetSize();
private:
    SharedMemory(int fd,const std::string &name);

    int mFD;
    std::string mName;

    bool SetName(const std::string &name);

    bool SetSize(int size);

    void* DoAlloc();
};
#endif //WORLDMAGISK_SHARE_MEMORY_H
